<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.10/vue.js"></script>
</head>
<body>
<div id="app">
    <button @click="changeIsShow">点击</button>
    <p v-if="isShow">我的发</p>
    <h1 v-else>除了v-if以外</h1>
</div>
<script>
    const vm = new Vue({
        el:"#app",
        data(){
            return{
                isShow:true
            }
        },
        methods:{
            changeIsShow(){
                this.isShow = !this.isShow
            }
        }
    })
</script>
</body>
</html>